package com.gang.music.core.intercept;

import com.gang.music.core.aop.Invocation;

/**
 * 后台验证用户注册提交的表单
 *
 */
public class RegisterValidator extends BladeValidator {

	@Override
	protected void doValidate(Invocation inv) {
		
		validateRegex("loginName", "[a-zA-Z][a-zA-Z0-9]{3,15}", "字母开头,字母或数字组成,4-16位");
		validateRegex("name", "[\u4e00-\u9fa5]{3,6}", "只允许输入中文,3-6位");
		validateRegex("plainPassword", passwordPattern, "数字和字母组成,6-20位");
		validateEqualField("plainPassword", "confirmPassword", "两次密码不一致");
	}

}
